﻿using System;
using System.Collections.Generic;
using System.Text;
using log4net;
using log4net.Config;

namespace AST.Logging
{
    public class Logging
    {
        // Define a static logger variable so that it references the
        // Logger instance named "MyApp".
        private static readonly ILog log = LogManager.GetLogger(typeof(Logging));

        public static void Init()
        {
            log4net.Config.XmlConfigurator.Configure();
        }

        public static void RecordError(Exception ex)
        {
            log.Error(ex.Message);
            log.Error(ex.StackTrace);
        }

        public static void RecordDebug(string message)
        {
            log.Debug(message);
        }

        public static void RecordInfo(string message)
        {
            log.Info(message);
        }
    }
}
